Optimal. Leaf size=29 \[ \frac{\cot (x)}{\sqrt{a \csc ^2(x)}}+\frac{\csc (x) \sec (x)}{\sqrt{a \csc ^2(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.101283, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {3657, 4125, 2590, 14} \[ \frac{\cot (x)}{\sqrt{a \csc ^2(x)}}+\frac{\csc (x) \sec (x)}{\sqrt{a \csc ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3657
Rule 4125
Rule 2590
Rule 14
Rubi steps
\begin{align*} \int \frac{\tan ^2(x)}{\sqrt{a+a \cot ^2(x)}} \, dx &=\int \frac{\tan ^2(x)}{\sqrt{a \csc ^2(x)}} \, dx\\ &=\frac{\csc (x) \int \sin (x) \tan ^2(x) \, dx}{\sqrt{a \csc ^2(x)}}\\ &=-\frac{\csc (x) \operatorname{Subst}\left (\int \frac{1-x^2}{x^2} \, dx,x,\cos (x)\right )}{\sqrt{a \csc ^2(x)}}\\ &=-\frac{\csc (x) \operatorname{Subst}\left (\int \left (-1+\frac{1}{x^2}\right ) \, dx,x,\cos (x)\right )}{\sqrt{a \csc ^2(x)}}\\ &=\frac{\cot (x)}{\sqrt{a \csc ^2(x)}}+\frac{\csc (x) \sec (x)}{\sqrt{a \csc ^2(x)}}\\ \end{align*}
Mathematica [A] time = 0.0302993, size = 19, normalized size = 0.66 \[ \frac{\cot (x)+\csc (x) \sec (x)}{\sqrt{a \csc ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.069, size = 33, normalized size = 1.1 \begin{align*}{\frac{\sqrt{4} \left ( \sin \left ( x \right ) \right ) ^{3}}{2\,\cos \left ( x \right ) \left ( -1+\cos \left ( x \right ) \right ) ^{2}}{\frac{1}{\sqrt{-{\frac{a}{ \left ( \cos \left ( x \right ) \right ) ^{2}-1}}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.49405, size = 24, normalized size = 0.83 \begin{align*} \frac{\tan \left (x\right )^{2} + 2}{\sqrt{\tan \left (x\right )^{2} + 1} \sqrt{a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.5484, size = 97, normalized size = 3.34 \begin{align*} \frac{{\left (\tan \left (x\right )^{3} + 2 \, \tan \left (x\right )\right )} \sqrt{\frac{a \tan \left (x\right )^{2} + a}{\tan \left (x\right )^{2}}}}{a \tan \left (x\right )^{2} + a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan ^{2}{\left (x \right )}}{\sqrt{a \left (\cot ^{2}{\left (x \right )} + 1\right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.32829, size = 55, normalized size = 1.9 \begin{align*} -\frac{2 \, \mathrm{sgn}\left (\tan \left (x\right )\right )}{\sqrt{a}} + \frac{\sqrt{a \tan \left (x\right )^{2} + a} + \frac{a}{\sqrt{a \tan \left (x\right )^{2} + a}}}{a \mathrm{sgn}\left (\tan \left (x\right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]